package com.shanzmoo.db.produce.entity.vo;

import com.alibaba.fastjson.JSON;
import com.shanzmoo.db.produce.entity.FactoryOrderDetailEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 生产单明细
 * @author: Gzhao 2020/12/16
 */
@Data
@ApiModel("生产单明细对象")
public class FactoryOrderDetailVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID", hidden = true)
    private Integer id;

    @ApiModelProperty("商品编码")
    private String sku;

    @ApiModelProperty("商品名称")
    private String skuName;

    @ApiModelProperty("商品单位")
    private String unit;

    @ApiModelProperty("规格属性描述")
    private String attributeDesc;

    @ApiModelProperty("商品数量")
    private Integer skuNum;

    public static List<FactoryOrderDetailVo> createList(List<FactoryOrderDetailEntity> list) {
        return JSON.parseArray(JSON.toJSONString(list), FactoryOrderDetailVo.class);
    }
}
